
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using Grebok.Common;
using Grebok.Common.Configuration;

namespace EVegetable.Persistence.Test.DataManager
{
    public class TSys_LogManager : BaseManager
    {
        #region private field

        private static TSys_LogManager manager;
        #endregion

        #region Properties
        
        public Int32 LogID
        {
            get { return GetConfig<Int32>("LogID"); }
            set { SetConfig<Int32>("LogID", value); }
        }
        
        public String ActionType
        {
            get { return GetConfig<String>("ActionType"); }
            set { SetConfig<String>("ActionType", value); }
        }
        
        public String ActionContent
        {
            get { return GetConfig<String>("ActionContent"); }
            set { SetConfig<String>("ActionContent", value); }
        }
        
        public String Operator
        {
            get { return GetConfig<String>("Operator"); }
            set { SetConfig<String>("Operator", value); }
        }
        
        public String AccessTime
        {
            get { return GetConfig<String>("AccessTime"); }
            set { SetConfig<String>("AccessTime", value); }
        }
        

        #endregion

        #region Constructor

        /// <summary>
        /// TSys_LogManager
        /// </summary>
        private TSys_LogManager()
        {
            IApplicationConfiguration configuration = ApplicationConfigurationFactor.CreateApplicationConfiguration();
            appPropertiese = new ApplicationProperties(configuration[PropertiesConst.TSYS_LOG_PROPERTIES_FILE_NAME_KEY],
                configuration[PropertiesConst.TSYS_LOG_PROPERTIES_SECTION_NAME_KEY]);

            appPropertieseValues = new Dictionary<string, object>();
        }
        #endregion

        #region TSys_LogManager Instance

        /// <summary>
        /// TSys_LogManager's Instance
        /// </summary>
        public static TSys_LogManager Instance
        {
            get
            {
                if (manager == null)
                {
                    manager = new TSys_LogManager();
                }
                return manager;
            }
        }
        #endregion

    }
}
